#ifndef CORE_H
#define CORE_H

#include <packetheader.h>
#include <flow.h>

#include <vector>
using namespace std;

#define NOT_FOUND -1

class Core
{

//    int cantFlujos;         // Contador de Flujos
//    int cantFlujosCerrados; // Contador de Flujos

    double in_kbytes;
    double out_kbytes;

    long processed_packets;

    vector<Flow> flows;
    vector<Flow> initiated;

    std::string ip;

public:
    Core();

    void processPacket(PacketHeader packet);

    double getInByteS();
    double getOutByteS();

    long getPacketsCount();

    vector<Flow> getInitiatedFlows();

private:
    int searchForFlow(vector<Flow> flows,Flow & flow);

public:
    void setIp(std::string ip)
    {
        this->ip = ip;
    }

};

#endif // CORE_H
